<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li><a ui-sref="main.plat.platInfo.list">资讯平台管理</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 内容区域 -->
<div class="wrapper-md content">
    <div class="panel panel-default">
        <!-- 头部 -->
        <div class="panel-heading font-bold">{{title}}
            <a class="btn btn-sm btn-icon btn-rounded btn-default pull-right m-t-n-xs" ui-sref="main.plat.platInfo.list"><i class="text-md fa fa-times text-muted"></i></a>
        </div>
        <!--表单-->
        <div class="panel-body">
            <form class="form-horizontal"  name="user_form">

                <!--资讯平台名称-->
                <div class="form-group">
                    <label class="col-lg-2 col-sm-3 control-label" for="platName">
                        <span class="text-danger wrapper-sm">*</span>资讯平台名称</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="platName" id="platName" placeholder="请输入资讯平台名称" ng-model="record.platName" >
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <!--平台Logo-->
                <div class="form-group">
                    <label class="col-lg-2 col-sm-3 control-label" for="platLogo"><span class="text-danger wrapper-sm">*</span>平台Logo:</label>

                    <div class="col-sm-6">
                        <div class="previewWrap fl">
                            <up-huiload multi="1" draggable="true" data='imgData' size="310" ratio='' class="previewMain">
                                <div class="upLoadImgWrap">
                                    <div class="preViewImgWrap fl" ng-repeat="preImg in imgData">
                                        <div class="preViewImg">
                                            <div class="picItem">
                                                <div class="mask"><span class="reUpLoad" index="{{$index}}">重新上传</span></div>
                                                <div><img ng-src="{{preImg.src[0]}}" onload="if(this.width>=this.height){this.style.width='100%'}else{this.style.height='100%'}"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div ng-show="imgData.length<1" class="clear">
                                        <div class="text fl" ng-show="imgData.length<1">
                                            点击上传图片<br>(请上传300KB以内图片)<br>(限jpg/png/jpeg)
                                        </div>
                                        <label class="upLoadImg fl" for="uploadFile">
                                            <img src="res/img/addPic.png" alt="">
                                            <input type="file" accept="image/png,image/gif,image/jpeg" id="uploadFile" autocomplete="off">
                                        </label>
                                    </div>
                                </div>
                            </up-huiload>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <!--平台简介-->
                <div class="form-group">
                    <label class="col-lg-2 col-sm-3 control-label" for="platDesc">
                        <span class="text-danger wrapper-sm">*</span>平台简介</label>
                    <textarea class="form-control" rows="3" style="width: 900px" ng-model="record.platDesc" id="platDesc"></textarea>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <!--平台所属分类-->
                <div class="form-group">
                    <label class="col-lg-2 col-sm-3 control-label" for="moduleNo">
                        <span class="text-danger wrapper-sm">*</span>平台所属分类:</label>
                    <div class="col-sm-3">
                        <select class="form-control" ng-model="record.moduleNo" ng-options="d.moduleNo as d.moduleName for d in platInfoList" id="moduleNo">
                            <option value="">--资讯平台--</option>
                        </select>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <!--btn-->
                <div class="form-group">
                    <div class="col-sm-6 col-sm-offset-2">
                        <button type="reset" class="btn ifc-btn btn-dark">重置</button>
                        <button type="submit" class="btn btn-info w-xs m-l-xl" ng-click="submit()" ng-disabled="isDisabled">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<style>
    #activity .record{
        width: 70%;
    }
    #activity .radio{
        min-width: 120px;
    }
    #activity .previewWrap{
        width:500px;
        padding-bottom: 10px;
        border:1px solid #d3d3d3;
    }
    #activity .previewWrap .text{
        margin-top:50px;
    }
    .MR10{
        margin-right: 10px;
    }
    .previewWrap{
        text-align: center;
        margin-right: 10px;
        margin-bottom: 20px;
    }
    .previewWrap .preview{
        width: 330px;
        height: 270px;
        border: 1px solid #d6d5d5;
        margin-top: 10px;
    }
    .previewWrap .preview .title{
        padding:10px;
        font-size: 12px;
        text-align: left;
    }
    .previewWrap .upLoadImg{
        width: 140px;
        height: 140px;
        border:1px dashed #d6d5d5;
        padding-top: 38px;
        margin:15px 0 0 30px;
        display:inline-block;
        background: url('res/img/addPic.png') no-repeat center;
        cursor: pointer;
    }
    .previewWrap .preview .text{
        color:#d6d5d5;
        padding-top: 20px;
    }

    .previewWrap .text{
        padding:13px 50px;
        /*margin-top: 50px;*/
    }
    .previewWrap .preViewImgWrap{
        margin: 15px;
    }
    .previewWrap .preViewImg{
        width:150px;
        height:150px;
        overflow: hidden;
    }
    .fl{
        float:left;
    }
    input[type="file"]{
        display: none;
    }
    .previewMain{
        /*height:86%;*/
    }

    .preViewImg{
        width:300px;
        height:190px;
        overflow: hidden;
    }
    .preViewImg img{
        /*width: 100%;*/

    }
    .preViewImg .picItem{
        height: 100%;
        position: relative;
    }
    .preViewImg .mask + div{
        height: 100%;
        width: 100%;
    }
    .picItem:hover .mask{
        height:100%;
    }
    .preViewImg .mask{
        position: absolute;
        overflow: hidden;
        height:0;
        width: 100%;
        background:rgba(0,0,0,0.5);
        transition: all 0.3s;
    }
    .preViewImg span{
        position:absolute;
        width: 80px;
        height:34px;
        border-radius: 17px;
        line-height: 34px;
        text-align: center;
        color: #fff;
        cursor: pointer;
        background:deepskyblue;
        left:50%;
        top:50%;
        font-size: 12px;
        transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -webkit-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
    }
</style>